﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Entity.PagedList<Entity.Car_Rental.Product>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Index
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
       产品管理-产品列表</h2>
    <table width="100%" cellpadding="3" cellspacing="1" id="listTable" class="liebiao_table">
        <tr>
            <th>
            </th>
            <th>
                名称
            </th>
            <th>
                分类
            </th>
            <th>
                状态
            </th>
            <th>
                市场价
            </th>
            <th>
                销售价
            </th>
            <th>
                打折
            </th>
          
        </tr>
        <% 
            if (Model != null && Model.Count > 0)
            {
                foreach (var item in Model)
                { %>
        <tr>
            <td>
                <%: Html.ActionLink("编辑", "Details", new { id = item.ProductID,flag="edit" })%>
                |
                <%: Html.ActionLink("查看 ", "Details", new { id = item.ProductID,flag="see"})%>
                |
                <%: Html.ActionLink("删除", "Delete", new { id = item.ProductID })%>
            </td>
            <td>
                <%: item.ProductName%>
            </td>
            <td>
                <%: item.CategoryID%>
            </td>
            <td>
                <%: ((Entity.CommonEnums.Status)item.Status).GetDescription()%>
            </td>
            <td>
                <%: String.Format("{0:F}", item.MarketPrice)%>
            </td>
            <td>
                <%: String.Format("{0:F}", item.RealPrice)%>
            </td>
            <td>
                <%: item.Discount%>
            </td>
            
          
        </tr>
        <% }
            } %>
        <tfoot>
            <tr>
                <td colspan="9">
                    <%=Html.Pager(Model) %>
                </td>
            </tr>
        </tfoot>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
    <script>
        tablelist();</script>
</asp:Content>
